<template>
    <div class="con">
         <div class="header">
          <van-nav-bar title="福利派详情页" left-text="返回"  right-text="分享" left-arrow class="spec" @click-right='share()' @click-left='tab1()'>
           <van-icon name="cluster-o" slot="right" />
            </van-nav-bar>
             <van-action-sheet v-model="show" title="分享到" height:30>
                <div class="share">
                    <share :config='config'></share>
                </div>
            </van-action-sheet>
        </div>
        <div class="main">
          <van-tabs v-model="activeName">
            <van-tab title="基本信息1" name="a" class="v-spec">
                <div class="v-banner">
                    <img src="../assets/p15.gif" alt="">
                </div>
                <div class="section">
                    <span>兑换货号:O15721</span>
                    <p>2019东方购物线下展会</p>
                    <em @click="report()">报名</em>
                </div>
                <aside> 
                    <em>
                        <van-icon name="underway-o" /><van-count-down
                        :time="time"
                        format="剩余DD天HH时mm分ss秒"
                        />
                    </em>
                    <p>
                        <span>报名鸥点: <em>10点</em></span>
                        <span> <em>572</em>人以申请</span>
                    </p>
                </aside>

            </van-tab>
            <van-tab title="商品详情" name="b" class="detail">
                 <img src="../assets/p10.gif" alt="">
                 <img src="../assets/p11.gif" alt="">
                 <img src="../assets/p12.gif" alt="">
                 <img src="../assets/p13.gif" alt="">
            </van-tab>
            <van-tab title="分享" name="c" class="c-share">暂时没有分享!</van-tab>
            </van-tabs>
        </div>
    </div>
</template>

<script>
import { Dialog } from 'vant';
import {mapState,mapGetters,mapActions,mapMutations} from 'vuex'
export default {
    name:'Detailbenefit',
    data(){
        return {
            time:30*60*60*1000,
             show:false,
        }
    },
    computed:{
        ...mapState(['config']),
    },
    methods:{
        tab1(){
            this.$router.go(-1)
        },
        report(){
           Dialog({ message: '报名成功' });
        },
        share(){
            this.show=true
        }
    }
}
</script>

<style scoped>
.social-share{
    display: flex;
    justify-content: space-between;
    padding: 0 38px
}
.share{
    height: 100px;
}
.c-share{
    text-align: center;
    padding-top: 10px
}
.detail img{
    width: 100%
}
.detail img:nth-of-type(2){
    margin-top: -5px
}
.detail img:nth-of-type(3){
    margin-top: -5px
}

.section{
    float: left;
    margin-top: 10px
}
aside{
    float: right;
    margin-top: 10px;
    position: relative;
}
aside>em{
    display: flex;
    align-items: center
}
aside>p{
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 40px;
    left: 20px;
}
aside>p span{
    font-size: 16px;
    margin-bottom: 3px
}
aside>p span em{
    color: red;
    font-size: 18px;
    font-weight: 600;
    font-style: normal;
}
aside>em .van-icon{
    color: #f76b5b;
    font-size: 16px;
    
}
aside>em .van-count-down{
    font-style: normal; 
    margin-left: 3px    
}
.section span{
    display: block;
    width: 120px;
    height: 25px;
    background:#c9c9c9 ;
    border-radius: 10px;
    color:#fcfcfc ;
    text-align:center ;
    line-height:25px ;
}
.section em{
   display: block;
    width: 130px;
    height: 40px;
    background: #fff;
    border: 1px solid #f76b5b;
    color:#f76b5b ;
    text-align:center ;
    line-height:40px ;
    font-size: 22px;
    font-style: normal;

}
.section  p{
    font-size: 14px;
    font-weight: 600;
}
.v-banner{
    width: 100%;
    height: 350px;
    background:#dbf9fb 
}
.v-banner img{
    width: 100%;
    margin-top: 80px
}
.v-spec{
    padding: 0 12px
}
.van-nav-bar__text{
    color: #000;
   
}
.van-nav-bar{
 background:#f8f8f8 
}
.van-nav-bar .van-icon{
    color: #333;
    margin-top: 3px
}
.van-nav-bar__title{
    font-size: 15px
}
.con{
    display: flex;
    flex-direction: column;
    background:#f3f3f3;
    height: 100vh;
}
.main{
    flex: 1;
    overflow: auto
}
</style>